home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / latexinfo / styles / latexinfo.sty (.txt) < prev    next >
LaTeX Document  |  1992-02-26  |  42KB  |  1,060 lines

  1. %% TeX macros to handle latexinfo files
  2. %% \include{ 5 page GNU copyleft here }
  3. %   Copyright (C) 1985, 1986 Richard M. Stallman
  4. %   Copyleft  (C) 1988, 1989, 1990, 1991 Michael E. Clarkson
  5. \def\latexinfoversion{1.7}
  6. \message{Loading Latexinfo package [Version \latexinfoversion]:}
  7. \message{}
  8. \setcounter{tocdepth}{2}
  9. \setcounter{secnumdepth}{3}
  10. \def\textfraction{.1}
  11. \def\bottomfraction{.9}        % was .3
  12. \def\topfraction{.9}
  13. \newcommand{\BibTeX}{{\sc Bib}\TeX}
  14. \def\oddfoot#1{\def\@oddfoot{#1}}
  15. \def\evenfoot#1{\def\@evenfoot{#1}}
  16. % Save some parts of plain latex whose names we will redefine.
  17. \let\ptexlbrace=\{
  18. \let\ptexrbrace=\}
  19. \let\ptexdot=\.
  20. \let\ptexstar=\*
  21. \let\ptexend=\end
  22. \let\ptexbullet=\bullet
  23. \let\ptexb=\b
  24. \let\ptexc=\c
  25. \let\ptexi=\i
  26. \let\ptext=\t
  27. \let\ptexl=\l
  28. \let\ptexL=\L
  29. \let\ptexdq=\"
  30. \def\pline{\hbox to\hsize}
  31. \def\pleftline#1{\pline{#1\hss}}
  32. \def\prightline#1{\pline{\hss#1}}
  33. \def\centerline#1{\pline{\hss#1\hss}}
  34. \def\tie{\penalty 10000\ }     % Save plain tex definition of ~.
  35. \let\normal=\normalsize
  36. \message{Basics,}
  37. \chardef\other=12
  38. \hyphenation{ap-pen-dix}
  39. \hyphenation{mini-buf-fer mini-buf-fers}
  40. % Parse an argument, then pass it to #1.
  41. % The argument can be delimited with [...] or with "..." or braces
  42. % or it can be a whole line.
  43. % #1 should be a macro which expects
  44. % an ordinary undelimited TeX argument.
  45. \def\parsearg #1{\let\next=#1\begingroup\obeylines\futurelet\temp\parseargx}
  46. \def\parseargx{%
  47. \ifx \obeyedspace\temp \aftergroup\parseargdiscardspace \else%
  48. \aftergroup \parseargline %
  49. \fi \endgroup}
  50. {\obeyspaces %
  51. \gdef\parseargdiscardspace {\begingroup\obeylines\futurelet\temp\parseargx}}
  52. \gdef\obeyedspace{\ }
  53. \def\parseargline{\begingroup \obeylines \parsearglinex}
  54. {\obeylines %
  55. \gdef\parsearglinex #1^^M{\endgroup \next {#1}}}
  56. \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
  57. % Single-spacing is done by various environments.
  58. \newskip\singlespaceskip
  59. \singlespaceskip = \baselineskip
  60. \def\singlespace{%
  61. {\advance \baselineskip by -\singlespaceskip
  62. \kern \baselineskip}%
  63. \baselineskip=\singlespaceskip
  64. \def\arrow{$\rightarrow$}
  65. % Used to generate quoted braces.
  66. \def\mylbrace {{\tt \char '173}}
  67. \def\myrbrace {{\tt \char '175}}
  68. \let\{=\mylbrace
  69. \let\}=\myrbrace
  70. % \: forces normal size whitespace following.
  71. \def\:{\spacefactor=1000 }
  72. % \* forces a line break.
  73. \def\*{\hfil\break}
  74. % \. is an end-of-sentence period.
  75. \def\.{.\spacefactor=3000 }
  76. % \w prevents a word break
  77. \def\w#1{\hbox{#1}}
  78. % \need space-in-mils
  79. % forces a page break if there is not space-in-mils remaining.
  80. \newdimen\mil  \mil=0.001in
  81. \def\need#1{\par %
  82. % This method tries to make TeX break the page naturally
  83. % if the depth of the box does not fit.
  84. {\baselineskip=0pt%
  85. \vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000
  86. \prevdepth=-1000pt
  87. % \br   forces paragraph break
  88. \let\br = \par
  89. % \dots{}  output some dots
  90. \def\dots{$\ldots$}
  91. % \page    forces the start of a new page
  92. %\def\page{\clearpage}
  93. % \exdent text....
  94. % outputs text on separate line in roman font, starting at standard page margin
  95. \def\exdent{\errmessage{\back exdent in filled text}}
  96.   % \lisp, etc, define \exdent locally from \internalexdent
  97. {\obeyspaces
  98. \gdef\internalexdent{\exdentzzz}}
  99. \def\exdentzzz#1{{\advance \leftskip by -\lispnarrowing
  100. \advance \hsize by -\leftskip
  101. \advance \hsize by -\rightskip
  102. \leftline{{\rm#1}}}}
  103. % \sp n   outputs n lines of vertical space
  104. \def\sp#1{\par\vskip #1\baselineskip\relax}
  105. % \comment ...line which is ignored...
  106. % \c is the same as @comment
  107. % \begin{ignore} ... \end{ignore}  is another way to write a comment
  108. \def\comment{\parsearg \commentxxx}
  109. \def\commentxxx #1{}
  110. \let\c=\comment
  111. % Some texinfo constructs that are trivial in tex
  112. % \newenvironment{iftex}{\relax}{\relax}
  113. % \newcommand{\iflatex}{}
  114. % \newcommand{\endiflatex}{}
  115. \def\iftex{\relax}
  116. \let\endiftex=\relax
  117. \catcode`@=11
  118. \message{menus,}
  119. {\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
  120. {\@gobble}{\ignorespaces}}}
  121. \chardef\active=13
  122. {\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active \let \@xobeysp}}
  123. \begingroup \catcode `|=0 \catcode `[= 1
  124. \catcode`]=2 \catcode `\{=12 \catcode `\}=12
  125. \catcode`\\=12 
  126. |gdef|@xmenu#1\end{menu}[|end[menu]]
  127. |gdef|@xifinfo#1\end{ifinfo}[|end[ifinfo]]
  128. |gdef|@xignore#1\end{ignore}[|end[ignore]]
  129. |endgroup
  130. \def\@menu{\begingroup
  131. \@tempswafalse 
  132. \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
  133. \obeylines \let\do\@makeother \dospecials}
  134. \def\menu{\@menu\@xmenu }
  135. \let\endmenu=\endgroup
  136. \def\ifinfo{\@menu\@xifinfo }
  137. \let\endifinfo=\endgroup
  138. \def\ignore{\@menu\@xignore }
  139. \let\endignore=\endgroup
  140. %    18-Mar-91 by Niels :
  141. %    Now you can use ",>,<,_,| in nodenames.
  142. %    The macros
  143. %    \node, \nodezzz, \pxref, \xref, \xrefX
  144. %    were changed,
  145. %    \label, \newlabel, \@testdef,
  146. %    were copied from latex.sty and slightly modified,
  147. %    new introduced are
  148. %    \@label, \@newlabel, \@@testdef, \@pxref, \@xref,
  149. %    \@ascii@doublequote, \@ascii@gtr, \@ascii@less,
  150. %        \@ascii@underscore, \@ascii@pipe,
  151. %    \@normal@doublequote, \@normal@gtr, \@normal@less,
  152. %        \@normal@underscore, \@normal@pipe,
  153. %    \doxrefnormalise, \doxrefspecials.
  154. %    To achieve this the above listed chars were catcoded to active
  155. %    chars. For labelnames (written on the aux-file) the CHAR's
  156. %    macro is set to \@ascii@CHAR
  157. %    (i.e. self-insert-command respectively \catcode`\CHAR=12)
  158. %    using \@doxrefspecials.
  159. %    For Topics printed on paper the CHAR's macro is set to the
  160. %    \@normal@CHAR
  161. %    (i.e. the current macrodefinition of CHAR)
  162. %    using \@doxrefnormalise.
  163. \def\node{%
  164.     \begingroup                    % 18-Mar-91, Niels
  165.         \doxrefspecials                % 18-Mar-91, Niels
  166.         \parsearg\nodezzz}
  167. \def\nodezzz#1{\nodexxx [#1,]\endgroup}    % \endgroup added 18-Mar-91, Niels
  168. \def\nodexxx[#1,#2]{\gdef\lastnode{#1}}
  169. %\def\node#1#2#3#4{\gdef\lastnode{#1}}
  170. \let\lastnode=\relax
  171. \def\label{\begingroup\doxrefspecials\@label}        % 18-Mar-91, Niels
  172. \def\@label#1{%    this is mostly \label of latex.sty      18-Mar-91, Niels
  173.     \@bsphack\if@filesw {\let\thepage\relax
  174.     \def\protect{\noexpand\noexpand\noexpand}%
  175.     \xdef\@gtempa{\write\@auxout{\string
  176.         \newlabel{#1}{{\@currentlabel}{\thepage}}}}}\@gtempa
  177.         \if@nobreak\ifvmode\nobreak\fi\fi\fi\@esphack
  178.     \endgroup}%             \endgroup added, 18-Mar-91, Niels
  179. \def\newlabel{\begingroup\doxrefspecials\@newlabel}    % 18-Mar-91, Niels
  180. \def\@newlabel#1#2{% this is mostly \newlabel of latex.sty 18-Mar-91, Niels
  181.     \@ifundefined{r@#1}{}{\@warning{Label `#1' multiply
  182.     defined}}\global\@namedef{r@#1}{#2}%
  183.     \endgroup}            % \endgroup added, 18-Mar-91, Niels
  184. \def\@testdef{\begingroup\doxrefspecials\@@testdef}    % 18-Mar-91, Niels
  185. \def\@@testdef #1#2#3{% this is mostly \@testdef of latex.sty 18-Mar-91, Niels
  186.     \def\@tempa{#3}%
  187.     \expandafter \ifx \csname #1@#2\endcsname
  188.         \@tempa  \else \@tempswatrue \fi
  189.     \endgroup}            % \endgroup added, 18-Mar-91, Niels
  190. \let\refill=\relax
  191. \let\alwaysrefill=\relax
  192. \def\setfilename#1{}
  193. \def\paragraphindent#1{}
  194. \def\footnotestyle#1{}
  195. %\def\do{\noexpand\do\noexpand}
  196. %\edef\@preamblecmds{\@preamblecmds \do \setfilename footnotestyle}
  197. \def\inforef #1{\inforefzzz #1,,,,**}
  198. \def\inforefzzz #1,#2,#3,#4**{\@@See{} Info file
  199.     \file{\losespace#3{}}, node `\losespace#1{}'}
  200. \def\losespace #1{#1}
  201. \message{fonts,}
  202. \font\egttt  = cmtt8            % typewriter
  203.     \hyphenchar\egttt = -1      %  suppress hyphenation in \tt font
  204. \font\nintt  = cmtt9              % typewriter
  205.    \hyphenchar\nintt = -1         %  suppress hyphenation in \tt font
  206. \font\tentt  = cmtt10   % typewriter
  207.    \hyphenchar\tentt = -1         %  suppress hyphenation in \tt font
  208. \font\elvtt  = cmtt10   scaled \magstephalf % typewriter
  209.    \hyphenchar\elvtt = -1         %  suppress hyphenation in \tt font
  210. \font\twltt  = cmtt12               % typewriter
  211.    \hyphenchar\twltt = -1         %  suppress hyphenation in \tt font
  212. \global\hyphenchar\egttt = `\-
  213. \global\hyphenchar\nintt = `\-
  214. \global\hyphenchar\tentt = `\-
  215. \global\hyphenchar\elvtt = `\-
  216. \global\hyphenchar\twltt = `\-
  217. % Font-change commands.
  218. % Should depend on optional point size.
  219. %\font\defbf=cmbx10 scaled \magstep1 %was 1314
  220. %\font\deftt=cmtt10 scaled \magstep1
  221. \def\df{\bf\tt}
  222. \def\li{\sf}
  223. %% Add scribe-like font environments, plus \l for inline lisp (usually sans
  224. %% serif) and \ii for TeX italic
  225. % \smartitalic{ARG} outputs arg in italics, followed by an italic correction
  226. % unless the following character is such as not to need one.
  227. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi}
  228. \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx}
  229. \let\i=\smartitalic
  230. \let\var=\smartitalic
  231. \let\dfn=\smartitalic
  232. \let\emph=\smartitalic
  233. \def\b#1{{\bf #1}}
  234. \let\strong=\b
  235. \def\t#1{{\tt \exhyphenpenalty=10000\rawbackslash \frenchspacing #1}\null}
  236. \def\key#1{{\tt \exhyphenpenalty=10000\uppercase{#1}}\null}
  237. \def\ctrl#1{$\uparrow${\tt #1}}
  238. %\def\ctrl#1{{\tt \rawbackslash \hat}#1}
  239. \def\samp #1{`\tclose{#1}'\null}
  240. \let\file=\samp
  241. % \code is a modification of \t,
  242. % which makes spaces the same size as normal in the surrounding text.
  243. \newdimen\tclosesave
  244. \newdimen\tcloserm
  245. \def\tclose#1{{\rm \tcloserm=\fontdimen2\font \tt \tclosesave=\fontdimen2\font
  246. \fontdimen2\font=\tcloserm
  247. % prevent breaking lines at hyphens.
  248. \exhyphenpenalty=10000
  249. \def\ {{\fontdimen2\font=\tclosesave{} }}%
  250.  \rawbackslash \frenchspacing #1\fontdimen2\font=\tclosesave}\null}
  251. \let\code=\tclose
  252. % \kbd is like \code, except that if the argument is just one \key command, 
  253. % then \kbd has no effect.
  254. \def\xkey{\key}
  255. \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
  256. \ifx\one\xkey\ifx\threex\three \key{#2}%
  257. \else\tclose{\look}\fi
  258. \else\tclose{\look}\fi}
  259. \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
  260. % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
  261. % argument is to make the input look right: \dmn{pt} instead of
  262. % \dmn{}pt.
  263. \def\dmn#1{\thinspace #1}
  264. \def\l#1{{\li #1}\null}
  265. \def\r#1{{\rm #1}}
  266. \def\scap#1{{\sc #1}}
  267. \def\ii#1{{\it #1}}
  268. \def\n#1{{\normalsize #1}}
  269. \def\bullet{$\ptexbullet$}
  270. \def\labelitemi{$\ptexbullet$}
  271. \def\minus{$-$}
  272. % Make altmode in file print out right
  273. \catcode `\^^[=\active \def^^[{$\diamondsuit$}
  274. %%% Fancy boxes from texinfo-2.11.tex
  275. % Since these characters are used in examples, it should be an even number of 
  276. % \tt widths. Each \tt character is 1en, so two makes it 1em.
  277. % Furthermore, these definitions must come after we define our fonts.
  278. \newbox\dblarrowbox    \newbox\longdblarrowbox
  279. \newbox\pushcharbox    \newbox\bullbox
  280. \newbox\equivbox       \newbox\errorbox
  281. \let\ptexequiv = \equiv
  282. {\tentt
  283. \global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
  284. \global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
  285. \global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
  286. \global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
  287. % Adapted from the manmac format (p.420 of TeXbook)
  288. \global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
  289.                                       depth .1ex\hfil}
  290. \def\point{$\star$}
  291. \def\result{\leavevmode\raise.15ex\copy\dblarrowbox}
  292. \def\expansion{\leavevmode\raise.1ex\copy\longdblarrowbox}
  293. \def\print{\leavevmode\lower.1ex\copy\pushcharbox}
  294. \def\equiv{\leavevmode\lower.1ex\copy\equivbox}
  295. % Does anyone really want this?
  296. % \def\bull{\leavevmode\copy\bullbox}
  297. % Adapted from the TeXbook's \boxit.
  298. {\tentt \global\dimen0 = 3em}% Width of the box.
  299. \dimen2 = .55pt % Thickness of rules
  300. % The text. (`r' is open on the right, `e' somewhat less so on the left.)
  301. \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
  302. \global\setbox\errorbox=\hbox to \dimen0{\hfil
  303.    \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
  304.    \advance\hsize by -2\dimen2 % Rules.
  305.    \vbox{
  306.       \hrule height\dimen2
  307.       \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
  308.          \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
  309.          \kern3pt\vrule width\dimen2}% Space to right.
  310.       \hrule height\dimen2}
  311.     \hfil}
  312. % The \error{} command.
  313. \def\error{\leavevmode\lower.7ex\copy\errorbox}
  314. \message{indexing,}
  315. % Index generation facilities
  316. % Define the texinfo user-accessible indexing commands for backwrds 
  317. % compatability.
  318. \def\cindex{\cpindex}
  319. \def\pindex{\pgindex}
  320. \def\vindex{\vrindex}
  321. \def\tindex{\tpindex}
  322. \def\kindex{\kyindex}
  323. \def\findex{\fnindex}
  324. % \newindex {foo} defines an index named foo.
  325. % It automatically defines \fooindex such that
  326. % \fooindex ...rest of line... puts an entry in the index foo.
  327. % It also defines \fooindfile to be the number of the output channel for
  328. % the file that    accumulates this index.  The file's extension is foo.
  329. % The name of an index should be no more than 2 characters long
  330. % for the sake of vms.
  331. \def\newindex#1{\csname newindex#1\endcsname}
  332. % Yes I know this could be done shorter, but safer??
  333. \def\newindexcp{\if@filesw \newwrite\@cpindexfile
  334.   \immediate\openout\@cpindexfile=\jobname.cp
  335.   \def\cpindex{\@bsphack\begingroup
  336.              \def\protect####1{\string####1\space}\@sanitize
  337.              \@wrindex\@cpindexfile}%
  338.   \def\cpsubindex{\@bsphack\begingroup
  339.              \def\protect####1{\string####1\space}\@sanitize
  340.              \@wrsubindex\@cpindexfile}%
  341.   \def\cpindexbold{\@bsphack\begingroup
  342.              \def\protect####1{\string####1\space}\@sanitize
  343.              \@wrindexbold\@cpindexfile}
  344.    \typeout{Writing concepts index file \jobname.cp }%
  345.    \fi}
  346. \def\cpindex{\@bsphack\begingroup \@sanitize\@index}
  347. \def\cpsubindex{\@bsphack\begingroup \@sanitize\@index}
  348. \def\cpindexbold{\@bsphack\begingroup \@sanitize\@index}
  349. \def\@wrindex#1#2{\let\thepage\relax
  350.    \xdef\@gtempa{\write#1{\string \entry{#2}{\thepage}{#2}}}\endgroup
  351.    \def\@tempa{}\def\thing{#2}\ifx\thing\@tempa\relax\else\@gtempa\fi
  352.    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
  353. \def\@wrindexbold#1#2{\let\thepage\relax \let\bf\relax
  354.    \xdef\@gtempa{\write#1{\string \entry{#2}{\b{\thepage}}{#2}}}\endgroup
  355.    \def\@tempa{}\def\thing{#2}\ifx\thing\@tempa\relax\else\@gtempa\fi
  356.    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
  357. \def\@wrsubindex#1#2#3{\let\thepage\relax
  358.     \xdef\@gtempa{\write#1{\string \entry{#2 #3}{\thepage}{#2}{#3}}}\endgroup%
  359.     \@gtempa
  360.    \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
  361. \def\@index#1{\endgroup\@esphack}
  362. \def\pgindex{\@bsphack\begingroup \@sanitize\@index}
  363. \def\newindexpg{\if@filesw \newwrite\@pgindexfile
  364.   \immediate\openout\@pgindexfile=\jobname.pg
  365.   \def\pgindex{\@bsphack\begingroup
  366.              \def\protect####1{\string####1\space}\@sanitize
  367.              \@wrindex\@pgindexfile}
  368.   \def\pgindexbold{\@bsphack\begingroup
  369.              \def\protect####1{\string####1\space}\@sanitize
  370.              \@wrindexbold\@pgindexfile}
  371.     \typeout{Writing index file \jobname.pg }\fi}
  372. \def\pgindex{\@bsphack\begingroup \@sanitize\@index}
  373. \def\pgindexbold{\@bsphack\begingroup \@sanitize\@index}
  374. \def\newindexvr{\if@filesw \newwrite\@vrindexfile
  375.   \immediate\openout\@vrindexfile=\jobname.vr
  376.   \def\vrindex{\@bsphack\begingroup
  377.              \def\protect####1{\string####1\space}\@sanitize
  378.              \@wrindex\@vrindexfile}
  379.   \def\vrindexbold{\@bsphack\begingroup
  380.              \def\protect####1{\string####1\space}\@sanitize
  381.              \@wrindexbold\@vrindexfile}
  382.     \typeout{Writing variable index file \jobname.vr }\fi}
  383. \def\vrindex{\@bsphack\begingroup \@sanitize\@index}
  384. \def\vrindexbold{\@bsphack\begingroup \@sanitize\@index}
  385. \def\newindextp{\if@filesw \newwrite\@tpindexfile
  386.   \immediate\openout\@tpindexfile=\jobname.tp
  387.   \def\tpindex{\@bsphack\begingroup
  388.              \def\protect####1{\string####1\space}\@sanitize
  389.              \@wrindex\@tpindexfile}
  390.   \def\tpindexbold{\@bsphack\begingroup
  391.              \def\protect####1{\string####1\space}\@sanitize
  392.              \@wrindexbold\@tpindexfile}
  393.     \typeout{Writing datatype index file \jobname.tp }\fi}
  394. \def\tpindex{\@bsphack\begingroup \@sanitize\@index}
  395. \def\tpindexbold{\@bsphack\begingroup \@sanitize\@index}
  396. \def\newindexky{\if@filesw \newwrite\@kyindexfile
  397.   \immediate\openout\@kyindexfile=\jobname.ky
  398.   \def\kyindex{\@bsphack\begingroup
  399.              \def\protect####1{\string####1\space}\@sanitize
  400.              \@wrindex\@kyindexfile}\typeout{Writing key index file \jobname.ky }\fi}
  401. \def\kyindex{\@bsphack\begingroup \@sanitize\@index}
  402. \def\kyindexbold{\@bsphack\begingroup \@sanitize\@index}
  403. \def\newindexfn{\if@filesw \newwrite\@fnindexfile
  404.   \immediate\openout\@fnindexfile=\jobname.fn
  405.   \def\fnindex{\@bsphack\begingroup
  406.              \def\protect####1{\string####1\space}\@sanitize
  407.              \@wrindex\@fnindexfile}
  408.   \def\fnindexbold{\@bsphack\begingroup
  409.              \def\protect####1{\string####1\space}\@sanitize
  410.              \@wrindexbold\@fnindexfile}
  411.     \typeout{Writing function index file \jobname.fn }\fi}
  412. \def\fnindex{\@bsphack\begingroup \@sanitize\@index}
  413. \def\fnindexbold{\@bsphack\begingroup \@sanitize\@index}
  414. % \synindex{foo}{bar}    makes index foo feed into index bar.
  415. \def\synindex#1#2{\expandafter\xdef \csname @#1index\endcsname{%
  416.     \noexpand\csname @#2index\endcsname}%
  417. \expandafter \chardef \csname @#1indexfile\endcsname=\csname @#2indexfile\endcsname}
  418. % \syncodeindex{foo}{bar}   similar, but put all entries made for index foo
  419. % inside bold.
  420. \def\syncodeindex#1#2{%
  421. \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
  422. \expandafter\let\csname#1indfile\endcsname=\synindexfoo
  423. \expandafter\xdef\csname#1index\endcsname{%    % Define \xxxindex
  424. \csname#1boldindex\endcsname{#2}}%
  425. % Define the macros used in formatting output of the sorted index material.
  426. % This is what you call to cause a particular index to get printed.
  427. % Write
  428. % \section*{Function Index}
  429. % \printindex{fn}
  430. \newskip\secondaryindent
  431. \secondaryindent=0.5cm
  432. \def\printindex#1{
  433. \def\indexbackslash{\rawbackslashxx}
  434. \tolerance=9500 \advance\baselineskip -1pt
  435. \openin 1 \jobname.#1s
  436. \ifeof 1 \else \closein 1 \input \jobname.#1s
  437. % These macros are used by the sorted index file itself.
  438. % Change them to control the appearance of the index.
  439. \def\Dotsbox{\hbox to 1em{\hss.\hss}} % Used by index macros
  440. \def\initial#1{%
  441. {\bigbreak\pline{\large\bf#1\hfill}\kern 2pt\penalty3000}}
  442. \def\entry #1#2{
  443. {\parfillskip=0in \parskip=0in \parindent=0in \small
  444. \hangindent=1in \hangafter=1%
  445. \noindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll\relax #2\par
  446. \def\primary #1{\pline{\small#1\hfil}}
  447. \def\secondary #1#2{
  448. {\parfillskip=0in \parskip=0in \small
  449. \hangindent =1in \hangafter=1
  450. \noindent\hskip\secondaryindent\hbox{#1}\leaders\Dotsbox\hskip 0pt plus 1filll#2\par
  451. %%% Args are the skip and penalty (usually negative)
  452. \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
  453. \message{environments,}
  454. % \begin{tex} ... \end{tex}    escapes into raw Tex temporarily.
  455. \def\tex{\begingroup
  456. \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
  457. \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
  458. \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
  459. \catcode `\%=14
  460. \catcode`\"=12
  461. \catcode`\|=12
  462. \catcode`\<=12
  463. \catcode`\>=12
  464. \let\{=\ptexlbrace
  465. \let\}=\ptexrbrace
  466. \let\.=\ptexdot
  467. \let\*=\ptexstar
  468. \let\bullet=\ptexbullet
  469. \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl
  470. \let\L=\ptexL
  471. \let\endtex=\endgroup}
  472. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  473. % \cartouche: draw rectangle w/rounded corners around argument
  474. \font\circfont=lcircle10
  475. \newdimen\circthick
  476. \newdimen\cartouter\newdimen\cartinner
  477. \newskip\normbskip\newskip\normpskip\newskip\normlskip
  478. \circthick=\fontdimen8\circfont
  479. \def\ctl{{\circfont\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
  480. \def\ctr{{\hskip 6pt\circfont\char'010}}
  481. \def\cbl{{\circfont\char'012\hskip -6pt}}
  482. \def\cbr{{\hskip 6pt\circfont\char'011}}
  483. \def\carttop{\hbox to \cartouter{\hskip\lskip
  484.     \ctl\leaders\hrule height\circthick\hfil\ctr
  485.     \hskip\rskip}}
  486. \def\cartbot{\hbox to \cartouter{\hskip\lskip
  487.     \cbl\leaders\hrule height\circthick\hfil\cbr
  488.     \hskip\rskip}}
  489. \newskip\lskip\newskip\rskip
  490. \long\def\cartouche{%
  491. \begingroup
  492.     \lskip=\leftskip \rskip=\rightskip
  493.     \leftskip=0pt\rightskip=0pt %we want these *outside*.
  494.     \cartinner=\hsize \advance\cartinner by-\lskip 
  495.                \advance\cartinner by-\rskip
  496.     \cartouter=\hsize
  497.     \advance\cartouter by 18pt % allow for 3pt kerns on either
  498. %                     side, and for 6pt waste from
  499. %                     each corner char
  500.     \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
  501.     \vbox\bgroup
  502.         \baselineskip=0pt\parskip=0pt\lineskip=0pt
  503.         \carttop
  504.         \hbox\bgroup
  505.             \hskip\lskip
  506.             \vrule\kern3pt
  507.             \vbox\bgroup
  508.                 \hsize=\cartinner
  509.                 \kern3pt
  510.                 \begingroup
  511.                     \baselineskip=\normbskip
  512.                     \lineskip=\normlskip
  513.                     \parskip=\normpskip
  514.                     \vskip -\parskip
  515. \def\endcartouche{%
  516.                 \endgroup
  517.                 \kern3pt
  518.             \egroup
  519.             \kern3pt\vrule
  520.             \hskip\rskip
  521.         \egroup
  522.         \cartbot
  523.     \egroup
  524. \endgroup
  525. % Define \lisp ... \endlisp.
  526. % Like example, but uses a smaller fixed-width font.
  527. % Wraps things in a \samepage.
  528. % Amount to narrow the margins by for \lisp.
  529. \newskip\lispnarrowing \lispnarrowing=\parindent
  530. % This is the definition that ^M gets inside \lisp
  531. % phr: changed space to \null, to avoid overfull hbox problems.
  532. {\obeyspaces%
  533. \gdef\lisppar{\null\endgraf}}
  534. % Cause \obeyspaces to make each Space cause a word-separation
  535. % rather than the default which is that it acts punctuation.
  536. % This is because space in tt font looks funny.
  537. {\obeyspaces %
  538. \gdef\sepspaces{\def {\ }}}
  539. \newskip\aboveenvskipamount \aboveenvskipamount= 0pt
  540. \def\aboveenvbreak{{\advance\aboveenvskipamount by \parskip
  541. \endgraf \ifdim\lastskip<\aboveenvskipamount
  542. \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}}
  543. \def\afterenvbreak{\endgraf \ifdim\lastskip<\aboveenvskipamount
  544. \removelastskip \penalty-50 \vskip\aboveenvskipamount \fi}
  545. %-----File: example.sty----------------------------------------------
  546.      
  547. % Copyright Denys Duchier, Yale University, 1988.
  548. % \begin{example}...\end{example} is very much like verbatim, except
  549. % that it doesn't change the meaning of \, { or }. This makes it
  550. % possible to include commands (such as font changes) in otherwise
  551. % verbatim text.
  552. % \begin{example*}{OFFSET}...\end{example*} is the same except that
  553. % everything is indented by OFFSET. This works even inside other list
  554. % environments.
  555. % inside example, you can use \begin{comment}...\end{comment} to
  556. % include normal TeX text. \begin{comment}[OFFSET] will offset the
  557. % comment by the specified offset.
  558.      
  559. \newdimen\exampleleftmargin \exampleleftmargin\z@
  560. \def\examplesavespecials{\let\xmpl@space\ \let\xmpl@dollar\$
  561. \let\xmpl@amper\&\let\xmpl@hash\#\let\xmpl@caret\^\let\xmpl@cntlK\^^K
  562. \let\xmpl@dq\"
  563. \let\xmpl@underscore\_\let\xmpl@cntlA\^^A\let\xmpl@percent\%
  564. \let\xmpl@tilde\%}
  565. \def\examplerestorespecials{\let\ \xmpl@space\let\$\xmpl@dollar
  566. \let\&\xmpl@amper\let\#\xmpl@hash\let\^\xmpl@caret\let\^^K\xmpl@cntlK
  567. \let\"\xmpl@dq
  568. \let\_\xmpl@underscore\let\^^A\xmpl@cntlA\let\%\xmpl@percent
  569. \let\%\xmpl@tilde}
  570. \def\example@dospecials{\do\ \do\$\do\&\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\%}
  571. \def\example@verbatim{\let\comment\xmpl@comment\let\endcomment\xmpl@@endcomment
  572.   \let\back\xmpl@back
  573.   \list{}{\parsep\parskip
  574.   \leftmargin\exampleleftmargin
  575.   \labelwidth\z@
  576.   \itemindent\z@
  577.   \def\makelabel##1{##1}}\item[]\if@minipage\else\vskip\parskip\fi
  578.   \leftskip\@totalleftmargin
  579.   \rightskip\z@
  580.   \parindent\z@
  581.   \parfillskip\@flushglue
  582.   \parskip\z@
  583.   \@tempswafalse
  584.   \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
  585.   \obeylines
  586. \ifcase \@ptsize\relax\tentt\or\elvtt\or\twltt\fi
  587. \hyphenpenalty=\@M \exhyphenpenalty=\@M \brokenpenalty=\@M
  588.   \@noligs
  589.   \examplesavespecials
  590.   \let\do\@makeother\dospecials}
  591. {\catcode`\ =\active
  592. \@vobeyspaces
  593. \gdef\xmpl@back{
  594. \let\@tempe \def\@tempa{\rawbackslashxx\@gobble}\def\@tempb{\rawbackslashxx}\futurelet\@tempc\@ifnch}
  595. \def\xmpl@comment{\@ifnextchar [{\xmpl@@comment}{\xmpl@@comment[0pt]}}
  596. \def\xmpl@@comment[#1]{\begingroup
  597.   \examplerestorespecials
  598.   \catcode`\ =10 \catcode`\^^M=5
  599.   \list{}{\leftmargin\exampleleftmargin
  600.   \advance\leftmargin #1}\item[]\rm\ignorespaces}
  601. \def\xmpl@@endcomment{\endlist\endgroup\vskip-\baselineskip}
  602. \def\@example{%
  603. \ifcase \@ptsize\relax\tentt\or\elvtt\or\twltt\fi
  604. \let\dospecials\example@dospecials 
  605.   \example@verbatim\frenchspacing\@vobeyspaces}
  606. \def\example{\exampleleftmargin\lispnarrowing\@example}
  607. \let\endexample\endlist
  608. \@namedef{example*}#1{\exampleleftmargin#1\@example}
  609. \expandafter\let\csname endexample*\endcsname\endexample
  610. \def\@smallexample{%
  611. \ifcase \@ptsize\relax\nintt\or\tentt\or\elvtt\fi
  612. \let\dospecials\example@dospecials
  613.   \example@verbatim\frenchspacing\@vobeyspaces}
  614. \def\smallexample{\exampleleftmargin\lispnarrowing\@smallexample}
  615. \let\endsmallexample\endlist
  616. \@namedef{smallexample*}#1{\exampleleftmargin#1\@smallexample}
  617. \expandafter\let\csname endsmallexample*\endcsname\endsmallexample
  618. \def\lisp{\example}
  619. \def\endlisp{\endexample}
  620. \def\smalllisp{\smallexample}
  621. \def\endsmalllisp{\endsmallexample}
  622. \def\@display{%
  623. \let\dospecials\example@dospecials
  624.   \example@verbatim\frenchspacing\@vobeyspaces}
  625. \def\display{\exampleleftmargin\lispnarrowing\@display}
  626. \let\enddisplay\endlist
  627. \def\@format{%
  628. \let\dospecials\example@dospecials
  629.   \example@verbatim\frenchspacing\@vobeyspaces}
  630. \def\format{\exampleleftmargin\z@\@format}
  631. \let\endformat\endlist
  632. \def\exdent#1{\hskip -\leftmargin \hbox{#1\hss}}
  633. %end -----File: example.sty----------------------------------------------
  634. \newbox\@onepagebox
  635. \def\same{\global\setbox\@onepagebox\vbox\bgroup 
  636. %    \boxmaxdepth\z@     % commented out 15 Dec 87
  637. %    \hsize\columnwidth \@parboxrestore}
  638. \begin{minipage}[c]{\linewidth}}
  639. \def\endsame{\end{minipage}\par\vskip\z@\egroup %
  640. \ifdim \ht\@onepagebox >\textheight 
  641. \ht\@onepagebox\textheight \fi
  642. \unvbox\@onepagebox}
  643. \newskip\ruletonoteskip \ruletonoteskip=6pt plus 3pt minus 1pt
  644. \newskip\ruletotextskip \ruletotextskip=10pt plus 12pt minus 2pt
  645. \newdimen\thinrule   \thinrule=0.4pt
  646. \def\beforenoterule{\par\@tempskipb\lastskip \@tempdima\prevdepth
  647.   \ifdim 0pt>\@tempdima \@tempdima=0pt\fi
  648.   \ifdim 14pt>\@tempskipb \vskip-\@tempskipb \vskip 14pt \fi
  649.   \kern-\@tempdima\nointerlineskip
  650.        \hrule height \thinrule width 12pc
  651.   \nobreak\vskip 16pt\vskip-\baselineskip\hbox{}\nobreak}
  652. \def\betweennoterule{\par\@tempskipb\lastskip \@tempdima\prevdepth
  653.   \ifdim 0pt>\@tempdima \@tempdima=0pt\fi
  654.   \nobreak
  655.   \vskip-\@tempskipb \vskip 11pt
  656.   \kern-\@tempdima\nointerlineskip
  657.              \hrule height \thinrule width 12pc\penalty-500\vskip -\thinrule
  658.        % The game here is to have *two* rules that normally coincide exactly,
  659.        % but if a page break occurs between them then you get one at the
  660.        % bottom of the first page and one at the top of the second page.
  661.        \hrule height \thinrule width 12pc
  662.         \nobreak\vskip 16pt\vskip-\baselineskip\hbox{}\nobreak}
  663. \def\afternoterule{\par\@tempskipb\lastskip \@tempdima\prevdepth
  664.   \ifdim 0pt>\@tempdima \@tempdima=0pt\fi
  665.   \nobreak
  666.   \vskip-\@tempskipb \vskip 11pt
  667.   \nobreak\kern-\@tempdima\nointerlineskip
  668.        \hrule height \thinrule width 12pc
  669.   \vskip 16pt}
  670. \def\afternoterule{\par\nobreak\vskip\ruletonoteskip
  671.            \hrule height \thinrule width 12pc
  672.            \vskip\ruletotextskip}
  673. \def\implementation{\par\small\noindent{\bf Implementation note:}}
  674. \def\endimplementation{\par}
  675. \def\rationale{\par\small\noindent{\bf Rationale:}}
  676. \def\endrationale{\par}
  677. \def\sideremark{\par\small\noindent{\bf Remark:}}
  678. \def\endsideremark{\par}
  679. \def\note{\par\small\noindent{\bf Note:}}
  680. \def\endnote{\par}
  681. \message{cross reference,}
  682. % Define cross-reference macros
  683. % \xref and \pxref generate cross references to specified points.
  684. \def\pxref{\begingroup\doxrefspecials\@pxref}%        18-Mar-91, Niels
  685. \def\@pxref #1{\@@see{} \xrefX [#1,,,,,,,]\endgroup}%    18-Mar-91, Niels
  686. \def\nxref{\begingroup\doxrefspecials\@nxref}%        18-Mar-91, Niels
  687. \def\@nxref #1{\xrefX [#1,,,,,,,]\endgroup}%    18-Mar-91, Niels
  688. \def\xref{\begingroup\doxrefspecials\@xref}%        18-Mar-91, Niels
  689. \def\@xref #1{\@@See{} \xrefX [#1,,,,,,,]\endgroup}%    18-Mar-91, Niels
  690. \def\MikesxrefX [#1,#2,#3,#4,#5,#6]{section \ref{#1} [%
  691. {\setbox0=\hbox{\losespace#3{}}%
  692. \ifdim \wd0 =0pt \losespace#1{}\else\unhbox0\fi}],
  693. page\tie \pageref{#1}}
  694. % In the following macro the sceleton isnt changed.
  695. % Instead of \setbox0 and \setbox1 the new boxes \@Topic and
  696. % \@APrintedManual are used.            18-Mar-91, Niels
  697. % Redefined out because it costs too many boxes 10-Nov-91  Mike.
  698. \newbox\@Topic
  699. \newbox\@APrintedManual
  700. \def\xrefX [#1,#2,#3,#4,#5,#6]{%
  701.     \setbox\@Topic=\hbox{\i{\losespace#5{}}}%
  702.     \setbox\@APrintedManual=\hbox{\losespace#3{}}%
  703.     \ifdim \wd\@Topic =0pt
  704.         \setbox\@Topic=\hbox{{\doxrefnormalise    % some what tricky
  705.             \losespace#1{}}}%
  706.     \@@section{} % print section in all cases just as the manual says.
  707.         % 18-Mar-91, Niels
  708.     \ifdim \wd\@APrintedManual >0pt%
  709.         \unhbox\@Topic{} in \unhbox\@APrintedManual%
  710.     \else    \ref{#1} [\unhbox\@Topic], \@@page\tie \pageref{#1}%
  711.     \fi}
  712. \message{sectioning,}
  713. % Define chapters, sections, etc.
  714. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  715.  \refstepcounter{chapter}
  716.  \typeout{\@chapapp\space\thechapter.}
  717.  \addcontentsline{toc}{chapter}{\protect
  718.  \numberline{\thechapter}#1}\else
  719.  \addcontentsline{toc}{chapter}{#1}\fi
  720.  \chaptermark{#1}
  721. \ifx\lastnode\relax\else\label{\lastnode}\fi
  722. \let\lastnode=\relax
  723.  \addtocontents{lof}{\protect\addvspace{10pt}}
  724. \addtocontents{lot}{\protect\addvspace{10pt}} \if@twocolumn
  725. \@topnewpage[\@makechapterhead{#2}] 
  726.  \else \@makechapterhead{#2}
  727.  \@afterheading \fi} 
  728. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  729.  \else \@makeschapterhead{#1} 
  730.  \@afterheading\fi}
  731. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  732.      \def\@svsec{}\else 
  733.      \refstepcounter{#1}
  734.     \edef\@svsec{\csname the#1\endcsname\hskip 1em }\fi
  735.      \@tempskipa #5\relax
  736.       \ifdim \@tempskipa>\z@ 
  737.         \begingroup #6\relax
  738.           \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
  739.         \endgroup
  740.        \csname #1mark\endcsname{#7}\addcontentsline
  741.          {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  742.                       \protect\numberline{\csname the#1\endcsname}\fi
  743.                     #7}\else
  744.         \def\@svsechd{#6\hskip #3\@svsec #8\csname #1mark\endcsname
  745.                       {#7}\addcontentsline
  746.                            {toc}{#1}{\ifnum #2>\c@secnumdepth \else
  747.                              \protect\numberline{\csname the#1\endcsname}\fi
  748.                        #7}}\fi
  749. \ifx\lastnode\relax\else\label{\lastnode}\fi
  750. \let\lastnode=\relax
  751.      \@xsect{#5}}
  752. % Unnumbered
  753. \def\unnumbered#1{\chapter*{#1}\@mkboth{\uppercase{#1}}{\uppercase{#1}}
  754. \addcontentsline{toc}{chapter}{#1}}     
  755. % This is bogus if you use it in a book or report style
  756. \def\unnumberedsec#1{\section*{#1}\@mkboth{\uppercase{#1}}{\uppercase{#1}}
  757. \addcontentsline{toc}{section}{#1}}     
  758. \def\unnumberedsubsec#1{\subsection*{#1}\addcontentsline
  759.     {toc}{subsection}{#1}}     
  760. \def\unnumberedsubsubsec#1{\subsubsection*{#1}\addcontentsline
  761.     {toc}{subsubsection}{#1}}     
  762. \message{verbatim,}
  763. %       ****************************************
  764. %       *              VERBATIM                *
  765. %       ****************************************
  766. %  The verbatim environment uses the fixed-width \tt font, turns blanks into 
  767. %  spaces, starts a new line for each carrige return (or sequence of 
  768. %  consecutive carriage returns), and interprets EVERY character literally.
  769. %  I.e., all special characters \, {, $, etc. are \catcode'd to 'other'.
  770. %  The command \verb produces in-line verbatim text, where the argument
  771. %  is delimited by any pair of characters.  E.g., \verb #...# takes
  772. %  '...' as its argument, and sets it verbatim in \tt font.
  773. %  The *-variants of these commands is the same, except that spaces
  774. %  print as the TeXbook's space character instead of as blank spaces.
  775. {\catcode`\^^M=13 \gdef\@gobblecr{\@ifnextchar
  776. {\@gobble}{\ignorespaces}}}
  777. {\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active\let \@xobeysp}}
  778. % Definition of \@xobeysp chaned on 19 Nov 86 from
  779. % \def\@xobeysp{\leavevmode{} }
  780. % to prevent line breaks at spaces.  Change suggested by
  781. % Nelson Beebe
  782. \def\@xobeysp{\leavevmode\penalty10000\ }
  783. \begingroup \catcode `|=0 \catcode `[= 1
  784. \catcode`]=2 \catcode `\{=12 \catcode `\}=12
  785. \catcode`\\=12 |gdef|@smallxverbatim#1\end{smallverbatim}[#1|end[smallverbatim]]
  786. |gdef|@smallsxverbatim#1\end{smallverbatim*}[#1|end[smallverbatim*]]
  787. |endgroup
  788. \def\@gobble#1{}
  789. \def\@smallverbatim{\trivlist \item[]\if@minipage\else\vskip\parskip\fi
  790. \leftskip\@totalleftmargin\rightskip\z@
  791. \parindent\z@\parfillskip\@flushglue\parskip\z@
  792. \@tempswafalse \def\par{\if@tempswa\hbox{}\fi\@tempswatrue\@@par}
  793. \obeylines     \ifcase \@ptsize\relax\nintt\or\tentt\or\elvtt\fi
  794. \catcode``=13 \@noligs \let\do\@makeother \dospecials}
  795. \def\smallverbatim{\@smallverbatim \frenchspacing\@vobeyspaces \@smallxverbatim}
  796. \def\endsmallverbatim{\endtrivlist%\def\baselinestretch{1.0}
  797. \@namedef{smallverbatim*}{\@smallverbatim\@smallsxverbatim}
  798. \expandafter\let\csname endsmallverbatim*\endcsname =\endtrivlist
  799. % Wizardly incantation of the net to include files verbatim
  800. % Usage         \verbatimfile{filename}
  801. %               \end{verbatim}
  802. \newcommand{\beginverb}{\begin{verbatim}}
  803. \newcommand{\inputfile}[1]{\input{#1}}
  804. \newcommand{\verbatimfile}[1]{\expandafter\beginverb\inputfile{#1}}
  805. \newcommand{\beginsmallverb}{\begin{smallverbatim}}
  806. \newcommand{\smallverbatimfile}[1]{\expandafter\beginsmallverb\inputfile{#1}}
  807. % Now make all imbedded control L's <Form Feed> act like \newpage
  808. \catcode`^^L = \active
  809. \def^^L{\newpage}
  810. %% For a final copy, take out the rectangles
  811. %% that mark overfull boxes (in case you have decided
  812. %% that the text looks ok even though it passes the margin).
  813. \def\finalout{\overfullrule=0pt}
  814. \message{and turning on latexinfo input format.}
  815. {\catcode`\@=0
  816. % \rawbackslashxx output one backslash character in current font
  817. \global\chardef\rawbackslashxx=`\\
  818. %{\catcode`\\=\other
  819. %@gdef@rawbackslashxx{\}}
  820. % \rawbackslash redefines \ as input to do \rawbackslashxx.
  821. {\catcode`\\=\active
  822. @gdef@rawbackslash{@let\=@rawbackslashxx }}
  823. % \back outputs one backslash in fixed width font.
  824. \def\back{{\tt\rawbackslashxx}}% inner {} forgotten,
  825.                 % added at 18-Mar-91, Stefan&Eric
  826.                 % \ignorespaces removed Feb 1992, mike
  827. \def\document{\endgroup
  828.   \@colht\textheight  \@colroom\textheight \vsize\textheight
  829.    \columnwidth\textwidth \@clubpenalty\clubpenalty
  830.    \if@twocolumn \advance\columnwidth -\columnsep 
  831.       \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue 
  832.    \fi
  833.   \hsize\columnwidth \linewidth\hsize
  834.   \begingroup\@floatplacement\@dblfloatplacement
  835.    \makeatletter\let\@writefile\@gobbletwo
  836.    \@input{\jobname.aux}\endgroup 
  837.   \if@filesw \immediate\openout\@mainaux=\jobname.aux
  838.     \immediate\write\@mainaux{\relax}\fi
  839.   \def\do##1{\let ##1\@notprerr}
  840.   \@preamblecmds
  841.   \let\do\noexpand
  842. \@normalsize\everypar{}\nospecials}
  843. %    LaTeXinfo support for  \cite
  844. %     CITE.STY -- compress numerical citations.
  845. %     See also OVERCITE.STY.
  846. %     Copyright (C) 1989 by Donald Arseneau
  847. %     These macros may be freely transmitted, reproduced, or modified for
  848. %     non-commercial purposes provided that this notice is left intact.
  849. \def\citen#1{%
  850. \if@filesw \immediate \write \@auxout {\string \citation {#1}}\fi 
  851. \@tempcntb\m@ne \let\@h@ld\relax \def\@citea{}%
  852. \@for \@citeb:=#1\do {%
  853.   \@ifundefined {b@\@citeb}%
  854.     {\@h@ld\@citea\@tempcntb\m@ne{\bf ?}%
  855.     \@warning {Citation `\@citeb ' on page \thepage \space undefined}}%
  856. % else
  857.     {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
  858.     \setbox\z@\hbox\bgroup\ifcat0\csname b@\@citeb \endcsname \relax
  859.        \egroup \@tempcntb\number\csname b@\@citeb \endcsname \relax
  860.        \else \egroup \@tempcntb\m@ne \fi
  861.     \ifnum\@tempcnta=\@tempcntb %   Number follows previous--hold on to it
  862.        \ifx\@h@ld\relax 
  863. %         % first pair of successives
  864.           \edef \@h@ld{\@citea\csname b@\@citeb\endcsname}% 
  865.        \else
  866. %         % compressible list of successives
  867. %         % use \hbox to avoid easy \exhyphenpenalty breaks on-line
  868.           \edef\@h@ld{\hbox{--}\penalty\@highpenalty
  869.               \csname b@\@citeb\endcsname}%
  870.        \fi
  871.     \else   %  non-successor--dump what's held and do this one
  872.        \@h@ld\@citea\csname b@\@citeb \endcsname 
  873.        \let\@h@ld\relax
  874.     \fi}%     
  875. %%    To put space after the comma, use:
  876.  \def\@citea{,\penalty\@highpenalty\hskip.13em plus.13em minus.13em}%
  877. %%    For no space after comma, use:
  878. %% \def\@citea{,\penalty\@highpenalty}% penalty is for on-line with note.
  879. }\@h@ld}
  880. %     Replacement for \@citex:
  881. \def\@citex[#1]#2{\@cite{\citen{#2}}{#1}}%
  882. %  Replacement for \@cite 
  883. \def\@cite#1#2{\leavevmode\unskip
  884.   \ifnum\lastpenalty=\z@\penalty\@highpenalty\fi% highpenalty before
  885.   \ [{\multiply\@highpenalty 3 #1%              % triple-highpenalties within.
  886.   \if@tempswa,\penalty\@highpenalty\ #2\fi}]}   % and before note.
  887. %    LaTeXinfo support for the \tabular-environment
  888. %% Some people want to use & and | as a normal char but tabulars too.
  889. %% So we define | to be electrical only within the preamble of the
  890. %% tabular-environment, and & in the body.
  891. %% To achieve this I use the \begingroup and \endgroup of the
  892. %% \begin{tabular} and \end{tabular} resp.
  893. %% "|" is catcoded to \other (12) before the preamble in \@tabular
  894. %% (see below) and after it to \active, yielding a vertbar within the
  895. %% body of the tabular-environment.
  896. %% The "&" is catcoded to 4 (tab char) after the preamble. So you can
  897. %% use "&" in the preamble as "self-insert-char".
  898. %% \@tabular is copied from latex.tex, 9-Apr-91,
  899. %% \@array is copied from latex.tex, 4-Sep-91,
  900. %% Niels-Holger Geske.
  901. \def\@tabular{% this macro is copied from latex.tex and slightly
  902.           % changed. 
  903.     \catcode`\|=\other%    for use in preamble, 4-Sep-91 Niels
  904.     \leavevmode
  905.     \hbox \bgroup
  906.         $\let\@acol\@tabacol
  907.         \let\@classz\@tabclassz
  908.         \let\@classiv\@tabclassiv
  909.         \let\\\@tabularcr
  910.         \@tabarray}
  911. \def\@array[#1]#2{% this macro is copied from latex.tex and slightly
  912.           % changed. 
  913.     \setbox\@arstrutbox=\hbox{\vrule 
  914.         height\arraystretch \ht\strutbox
  915.         depth\arraystretch \dp\strutbox
  916.         width\z@}%
  917.     \@mkpream{#2}%
  918.     \edef\@preamble{%
  919.         \halign
  920.         \noexpand\@halignto
  921.         \bgroup
  922.             \tabskip\z@
  923.             \@arstrut
  924.             \@preamble
  925.             \tabskip\z@
  926.             \cr}%
  927.     \let\@startpbox\@@startpbox
  928.     \let\@endpbox\@@endpbox
  929.     \catcode`\&=4%        for seperating columns, 4-Sep-91 Niels
  930.     \catcode`\|=\active%    for getting vertbar, 4-Sep-91 Niels
  931.     \if #1t\vtop
  932.     \else    \if#1b\vbox
  933.         \else    \vcenter
  934.     \fi    \fi
  935.     \bgroup    \let\par\relax
  936.         \let\@sharp##%
  937.         \let\protect\relax
  938.         \lineskip\z@
  939.         \baselineskip\z@
  940.         \@preamble}
  941. % Here is a list of the characters that have been specially catcoded:
  942. \def\dosomespecials{\do\$\do\&\do\#\do\%\do\~\do\^}
  943. \newcount\l@nguage
  944. % This will be re-declared as \language if the latter has not yet been
  945. % declared neither by Ferguson's ``Multilingual T^eX'' nor by TeX 3:
  946. % \ifundefined{language}
  947. \expandafter\ifx\csname language\endcsname\relax
  948. \global\let\language=\l@nguage
  949. \newcount\USenglish  \global\USenglish=0
  950. \newcount\german     \global\german=1
  951. \newcount\austrian   \global\austrian=2
  952. \newcount\french     \global\french=3
  953. \newcount\english    \global\english=4
  954. % We want all these funny characters CHARs to appear in the printed
  955. % manual as themselves. So we catcode them to \active and \let them to
  956. % produce the character CHAR from the \tt font (see \nospecials
  957. % below). But when writing to the .aux-file, we must write the
  958. % ascii-code of the character, stored in \@ascii@CHAR, not the
  959. % activated macro, whose definition is saved in \@normal@CHAR (see
  960. % \doxrefspecials below). The macro \doxrefnormalise restores these
  961. % @normal@ definitions. 4-Sep-91  Niels-Holger Geske
  962. {\begingroup            % the following lines inserted at 18-Mar-91, Niels
  963.         \catcode`\"=\other
  964.         \gdef\@ascii@doublequote{"}
  965.         \catcode`\>=\other
  966.         \gdef\@ascii@gtr{>}
  967.         \catcode`\<=\other
  968.         \gdef\@ascii@less{<}
  969.         \catcode`\_=\other
  970.         \gdef\@ascii@underscore{_}
  971.         \catcode`\|=\other
  972.         \gdef\@ascii@pipe{|}%                   Fixed, was "
  973. \endgroup
  974. \catcode`\"=\active
  975. \catcode`\>=\active
  976. \catcode`\<=\active
  977. \catcode`\_=\active
  978. \catcode`\|=\active
  979. \gdef\doxrefnormalise{% the following lines inserted at 18-Mar-91, Niels
  980.     \catcode`\"=\active
  981.     \let"=\@normal@doublequote
  982.     \catcode`\>=\active
  983.     \let>=\@normal@gtr
  984.     \catcode`\<=\active
  985.     \let<=\@normal@less
  986.     \catcode`\_=\active
  987.     \let_=\@normal@underscore
  988.     \catcode`\|=\active
  989.     \let|=\@normal@pipe}
  990. \gdef\doxrefspecials{% the following lines inserted at 18-Mar-91, Niels
  991.     \let\@normal@doublequote="%
  992.     \let\@normal@gtr=>%
  993.     \let\@normal@less=<%
  994.     \let\@normal@underscore=_%
  995.     \let\@normal@pipe=|%
  996.     \catcode`\"=\active
  997.     \let"=\@ascii@doublequote
  998.     \catcode`\>=\active
  999.     \let>=\@ascii@gtr
  1000.     \catcode`\<=\active
  1001.     \let<=\@ascii@less
  1002.     \catcode`\_=\active
  1003.     \let_=\@ascii@underscore
  1004.     \catcode`\|=\active
  1005.     \let|=\@ascii@pipe}
  1006. \gdef\@englishtext{%
  1007.     \def\@@See{See}%
  1008.     \def\@@see{see}%
  1009.     \def\@@section{section}%
  1010.     \def\@@page{page}%
  1011. \gdef\@germantext{%
  1012.     \def\@@See{Siehe}%
  1013.     \def\@@see{siehe}%
  1014.     \def\@@section{Abschnitt}%
  1015.     \def\@@page{Seite}%
  1016. \gdef\@frenchtext{%
  1017.     \def\@@See{Voir}%
  1018.     \def\@@see{voir}%
  1019.     \def\@@section{section}%
  1020.     \def\@@page{Page}%
  1021. \gdef\nospecials{%
  1022.     \ifnum\language=\USenglish 
  1023.         \@englishtext
  1024.         \catcode`\"=\active
  1025.         \gdef\activedoublequote{{\tt \char '042}}%
  1026.         \let"=\activedoublequote
  1027.     \else
  1028.         \ifnum\language=\english
  1029.         \@englishtext
  1030.         \catcode`\"=\active
  1031.         \gdef\activedoublequote{{\tt \char '042}}%
  1032.         \let"=\activedoublequote
  1033.     \else
  1034.         \ifnum\language=\german
  1035.         \@germantext
  1036.         % \ifundefined{mdqon} or \mdqon=\relax
  1037.         \expandafter\ifx\csname mdqon\endcsname\relax
  1038.         % \then make " a "
  1039.             \catcode`\"=\active
  1040.             \gdef\activedoublequote{{\tt \char '042}}%
  1041.             \let"=\activedoublequote
  1042.         \fi
  1043.     \else
  1044.         \ifnum\language=\french
  1045.         \@frenchtext
  1046.         \fi\fi\fi\fi
  1047.     \catcode`\>=\active
  1048.     \gdef\activegtr{{\tt \char '076}}
  1049.     \let>=\activegtr
  1050.     \catcode`\<=\active
  1051.     \gdef\activeless{{\tt \char '074}}
  1052.     \let<=\activeless
  1053.     \catcode`\_=\active
  1054.     \gdef\activeunderscore{{\tt \char '137}}
  1055.     \let_=\activeunderscore
  1056.     \catcode`\|=\active
  1057.     \gdef\activevertbar{{\tt \char '174}}
  1058.     \let|=\activevertbar
  1059.     \@noligs\let\do\@makeother \dosomespecials}
  1060.